package com.easy.query.test.entity.proxy;

import com.easy.query.core.expression.parser.core.available.TableAvailable;
import com.easy.query.core.proxy.AbstractProxyEntity;
import com.easy.query.core.proxy.SQLColumn;
import com.easy.query.core.proxy.SQLSelectAsExpression;
import com.easy.query.core.proxy.fetcher.AbstractFetcher;
import com.easy.query.core.proxy.core.EntitySQLContext;
import com.easy.query.test.entity.TopicAuto;
import com.easy.query.core.proxy.columns.SQLNumberColumn;
import com.easy.query.core.proxy.columns.SQLStringColumn;
import com.easy.query.core.proxy.columns.SQLDateTimeColumn;

/**
 * this file automatically generated by easy-query, don't modify it
 * 当前文件是easy-query自动生成的请不要随意修改
 *
 * @author xuejiaming
 */
public class TopicAutoProxy extends AbstractProxyEntity < TopicAutoProxy, TopicAuto > {

    private static final Class < TopicAuto > entityClass = TopicAuto .class;

    public static TopicAutoProxy createTable () {
        return new TopicAutoProxy ();
    }

    public TopicAutoProxy () {
    }

    /**
     * {@link TopicAuto#getId}
     */
    public SQLNumberColumn < TopicAutoProxy, java.lang.Integer> id(){
    return getNumberColumn("id", java.lang.Integer.class);
}

    /**
     * {@link TopicAuto#getStars}
     */
    public SQLNumberColumn < TopicAutoProxy, java.lang.Integer> stars(){
    return getNumberColumn("stars", java.lang.Integer.class);
}

    /**
     * {@link TopicAuto#getTitle}
     */
    public SQLStringColumn < TopicAutoProxy, java.lang.String> title(){
    return getStringColumn("title", java.lang.String.class);
}

    /**
     * {@link TopicAuto#getCreateTime}
     */
    public SQLDateTimeColumn < TopicAutoProxy, java.time.LocalDateTime> createTime(){
    return getDateTimeColumn("createTime", java.time.LocalDateTime.class);
}


    @Override
    public Class < TopicAuto > getEntityClass () {
        return entityClass;
    }


    /**
     * 数据库列的简单获取
     * @return
     */
    public TopicAutoProxyFetcher FETCHER = new TopicAutoProxyFetcher (this, null, SQLSelectAsExpression.empty);


    public static class TopicAutoProxyFetcher extends AbstractFetcher<TopicAutoProxy, TopicAuto, TopicAutoProxyFetcher> {

        public TopicAutoProxyFetcher (TopicAutoProxy proxy, TopicAutoProxyFetcher prev, SQLSelectAsExpression sqlSelectAsExpression) {
        super(proxy, prev, sqlSelectAsExpression);
    }


        /**
         * {@link TopicAuto#getId}
         */
        public TopicAutoProxyFetcher id() {
            return add(getProxy().id());
        }

        /**
         * {@link TopicAuto#getStars}
         */
        public TopicAutoProxyFetcher stars() {
            return add(getProxy().stars());
        }

        /**
         * {@link TopicAuto#getTitle}
         */
        public TopicAutoProxyFetcher title() {
            return add(getProxy().title());
        }

        /**
         * {@link TopicAuto#getCreateTime}
         */
        public TopicAutoProxyFetcher createTime() {
            return add(getProxy().createTime());
        }


        @Override
        protected TopicAutoProxyFetcher createFetcher(
            TopicAutoProxy cp,
            AbstractFetcher<TopicAutoProxy, TopicAuto, TopicAutoProxyFetcher> prev,
            SQLSelectAsExpression sqlSelectExpression
        ) {
            return new TopicAutoProxyFetcher (cp, this, sqlSelectExpression);
        }
    }

}
